<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:tiles="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8"/>
    <title tiles:fragment="title">申请历史</title>

    <link href="../../static/css/all.css" rel="stylesheet" type="text/css"/>
    <script src="https://code.jquery.com/jquery-3.1.1.js"></script>
    <script src="../../static/js/main.js"></script>
</head>

<body>

<div class="content" th:fragment="content" tiles:fragment="content">
    <div class="content-nav">
        <div class="titleNav">
            <div class="title_nav title_nav_Now">
                <a>申请历史</a>
            </div>
        </div>
    </div>

    <!--<div class="content-function">-->
    <!--<div class="myDivBt">-->
    <!--<a href="add/apply_form.html" th:href="@{/apply/add}">新建申请</a>-->
    <!--</div>-->
    <!--</div>-->

    <div class="content-function">
        <button id="slide_panel_bt" class="icon-search"></button>
        <div class="myDivBt">
            <a href="#new" onclick="jumpTo('apply/addajax')">新建申请</a>
        </div>
    </div>

    <div class="content-query myInput slide-panel">
        <form action="#" id="storageQueryForm">
            <div class="content-query-left" id="applyQuery">
                <label>
                    申请单Id：
                    <input type="text" name="applicationId"/>
                </label>
                <label>
                    审核状态：
                    <input type="text" name="states"/>
                </label>
                <label>
                    审核人ID：
                    <input type="text" name="examineId"/>
                </label>
                <label>
                    最近多少天：
                    <input type="number" name="day" min="0"/>
                </label>
            </div>
            <div class="content-query-right">
                <input type="button" onclick="queryApplyList()" value="查询"/>
                <!--todo-->
                <!--<button class="icon-after-search" onclick="queryStorageList()">查询</button>-->
            </div>
        </form>
    </div>

    <div class="content-result myTable">
        <table id="result_apply_table">
            <tr>
                <th>申请单编号</th>
                <th>申请日期</th>
                <th>审核人员编号</th>
                <th>审核状态</th>
                <th>审核日期</th>
                <th>详情</th>
            </tr>
            <tr th:if="${history==null||history.isEmpty()}">
                <td colspan="6">没有申请单信息</td>
            </tr>
            <tr th:each="itemApplicationOperation:${history}">
                <!--/*@thymesVar id="itemApplicationOperation" type="com.repository.entity.ItemApplicationOperationEntity"*/-->
                <td th:text="${itemApplicationOperation.applicationId}"></td>
                <td th:text="${itemApplicationOperation.applicationTime}">表中没有此列</td>
                <td th:text="${itemApplicationOperation.examineId}"></td>
                <td th:text="${itemApplicationOperation.states}"></td>
                <td th:text="${itemApplicationOperation.statesTime}"></td>
                <td class="myTable-operation-info icon-info-circle"
                    th:onclick="'openPop_applyInfo(\''+${itemApplicationOperation.applicationId}+'\')'"></td>
            </tr>
        </table>
    </div>

    <div class="pop-bg">
        <div class="pop myTable" style="top: 5em;width: 65em;padding: 5em;height: 30em;">
            <div class="pop-close">
                <div class="close_button" onclick="closePop()">
                    <div class="close_button-icon"></div>
                </div>
            </div>
            <section style="text-align: center">
                <label style="float: left">申请单编号:"<span id="apply_id"></span></label>
                <label>申请人ID:<span id="operation_id"></span></label>
                <label style="float: right">申请日期:<span id="apply_time"></span></label>
            </section>
            <div>
                <table>
                    <tr>
                        <th>物品条形码</th>
                        <th>申请数量</th>
                        <th>申请类型</th>
                        <th>申请备注</th>
                    </tr>
                </table>
            </div>
            <div style="height: 27em;overflow-x:hidden;overflow-y: scroll;width: 66em">
                <table id="apply_table">
                    <tbody></tbody>
                </table>
            </div>
        </div>
    </div>
</div>

</body>
</html>